package cn.com.yiqi.wsc.portal.controller.city;

import cn.com.yiqi.wsc.common.Result;
import cn.com.yiqi.wsc.dao.city.criteria.CityCriteria;
import cn.com.yiqi.wsc.service.city.PortalCityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author 何刚
 * @ClassName: ${class}
 * @Description: TODO
 * @date 2017/3/6
 */
@RequestMapping("/city")
@Controller
public class CityController {

    @Autowired
    private PortalCityService portalCityService;

    @RequestMapping("/list")
    @ResponseBody
    public Result list(@RequestBody CityCriteria criteria) {

        Result result = new Result();

        result = portalCityService.getCodeAndCityNameByCityCode(criteria);

        return result;
    }

}
